<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>demo</title>
    <style>
        *{
            padding: 0;
            margin: 0;;
            list-style: none;
        }

        .nav{
            background: cornflowerblue;
        }


        .box{
            width: 1000px;
            margin: 0 auto;
            /* 
            导航栏如果设置高度的话那么也要设置行高
            因为行高会被里面的li标签继承
            */
            height: 30px;
            line-height: 30px;
            background-color: aquamarine;
        }
        .box ul li{
            background-color: blueviolet;
            float: left;
            margin-right: 20px;
        }

        .demo{
            width: 200px;
            line-height: 200px;
            background-color: crimson;
        }
    </style>
</head>
<body>

    <div class="nav">
        <div class="box">
            <ul>
                <li>HTML</li>
                <li>CSS</li>
                <li>JavaScript</li>
                <li>TypeScript</li>
                <li>Flutter</li>
            </ul>
        </div>

    </div>

    <div class="demo">

    </div>
   
</body>
</html>